<?php echo $header;echo $sidebar ?>
<style>
a.edit_icon {
	background: url("<?php echo $this->config->base_url(); ?>assets/admin/admin_images/icons/edit.gif") no-repeat scroll left top transparent;
	display: inline-block;
	height: 16px;
	width: 16px;
}
a.delete2_icon {
	background: url("<?php echo $this->config->base_url(); ?>assets/admin/images/icon/delete.png") no-repeat scroll left top transparent;
	display: inline-block;
	height: 16px;
	width: 16px;
}
ul.yiiPager {
	border: 0 none;
	display: inline;
	font-size: 11px;
	line-height: 100%;
	margin: 0;
	padding: 0;
}
ul.yiiPager a:link, ul.yiiPager a:visited {
	border: 1px solid #9AAFE5;
	color: #0E509E;
	font-weight: bold;
	padding: 1px 6px;
	text-decoration: none;
}
.star {
	color: red;
}
.error {
	color:#B94A66;
	font-style:italic;
}
.required {
	color:#C00;
}
</style>
<div class="span10 content"> <?php echo $hugemenu ?>
  <h1>Edit list</h1>
  <?php if($this->session->flashdata('message')) {?>
  <div class="alert alert-success"> <?php echo $this->session->flashdata('message') ?> </div>
  <?php  }?>
  <div>
    <div class="tab-content">
      <div align="left">
        <h5>General Data</h5>
        <?php echo form_open(current_url()); ?> <?php echo $custom_error; ?>
        <table cellspacing="0" cellpadding="0" border="0" width="55%" >
          <tbody>
            <tr>
              <td><b>
                <label for="name">Name<span class="required">*</span></label>
                </b></td>
              <td colspan="3"><input id="name" type="text" name="name" value="<?php echo $list['name']; ?>"  style='width:40em;'/>
                <?php echo form_error('name'); ?></td>
            </tr>
            <tr>
              <td><b>
                <label for="description">Description<span class="required">*</span></label>
                </b></td>
              <td colspan="3"><textarea id="description" name="description"  style="width: 520px;" rows="5"><?php echo $list['description']; ?></textarea>
                <?php echo form_error('description'); ?></td>
            </tr>
            <tr>
              <td ><b>
                <label for="opt_in">Opt_in<span class="required">*</span></label>
                </b></td>
              <td><?php
                                    $enum = array('0'=>'Single opt-in','1'=>'Double opt-in'); 
                                    echo form_dropdown('opt_in', $enum); 
                                    ?>
                <?php echo form_error('opt_in'); ?></td>
              <td><b>
                <label for="opt_out">Opt_out<span class="required">*</span></label>
                </b></td>
              <td><?php
                                      $enum = array('0'=>'Single opt-out','1'=>'Double opt-out'); 
                                    echo form_dropdown('opt_out', $enum); 
                                    ?>
                <?php echo form_error('opt_out'); ?></td>
            </tr>
          </tbody>
        </table>
      </div>
      <div   align="left"> <br/>
        <h5>Defaults</h5>
        <table cellspacing="0" cellpadding="8" border="0"  width="50%" >
          <tbody>
            <tr>
              <td width="18%"><b>
                <label for="from_name">From Name<span class="required">*</span></label>
                </b></td>
              <td ><input id="from_name" type="text" name="from_name" value="<?php echo $list_default['from_name']; ?>" style='width:37em;'/>
                <?php echo form_error('from_name'); ?></td>
            </tr>
            <tr>
              <td width="18%"><b>
                <label for="from_email">From Email<span class="required">*</span></label>
                </b></td>
              <td><input id="from_email" type="text" name="from_email" value="<?php echo $list_default['from_email']; ?>" style='width:37em;' />
                <?php echo form_error('from_email'); ?></td>
            </tr>
            <tr>
              <td width="18%"><b>
                <label for="reply_to">Reply_to<span class="required">*</span></label>
                </b></td>
              <td><input id="reply_to" type="text" name="reply_to" value="<?php echo $list_default['reply_to']; ?>"  style='width:37em;'/>
                <?php echo form_error('reply_to'); ?></td>
            </tr>
            <tr>
              <td width="18%"><b>
                <label for="subject">Subject</label>
                </b></td>
              <td><input id="subject" type="text" name="subject" value="<?php echo $list_default['subject']; ?>"  style='width:37em;'  />
                <?php echo form_error('subject'); ?></td>
            </tr>
          </tbody>
        </table>
      </div>
      <div > <br/>
        <h5>Notifications</h5>
        <table cellspacing="0" cellpadding="8" border="0"  width="80%" >
          <tbody>
            <tr>
              <td width="03%"><b>
                
                <label for="subscribe">Subscribe<span class="required">*</span></label>
                </b></td>
              <td width="15%"><?php
                                    $enum = array(''=>'Choose','yes'=>'Yes','no'=>'No'); 
                                    echo form_dropdown('subscribe', $enum); 
                                    ?>
                <?php echo form_error('subscribe'); ?></td>
              <td width="10%"><b>Subscribe To</b></td>
              <td width="20%"><input type="text"/></td>
            </tr>
            <tr>
              <td><label for="unsubscribe">Unsubscribe<span class="required">*</span></label></td>
              <td><?php
                                    $enum = array(''=>'Choose','yes'=>'Yes','no'=>'No'); 
                                    echo form_dropdown('unsubscribe', $enum); 
                                    ?>
                <?php echo form_error('unsubscribe'); ?></td>
              <td><b>Unsubscribe To</b></td>
              <td><input type="text"/></td>
            </tr>
          </tbody>
        </table>
      </div>
      <div > <br/>
        <h5>Company Details</h5>
        <table cellspacing="0" cellpadding="8" border="0"  width="100%" >
          <tbody>
            <tr>
              <td><b>
                <label for="name">Name<span class="required">*</span></label>
                </b></td>
              <td colspan="7"  ><input id="company_name" type="text" name="company_name" value="<?php echo $list_company['name']; ?>"  style='width:29em;' />
                <?php echo form_error('company_name'); ?></td>
            </tr>
            <tr>
              <td><b>
                <label for="country_id">Country<span class="required">*</span></label>
                </b></td>
              <td colspan="3" ><select style='width:32em;' id="country_id"  name="country_id"  >
                  <option value="2">Pakistan</option>
                  <option value="4">USA</option>
                </select>
                <?php echo form_error('country_id'); ?></td>
              <td ><b>
                <label for="zone_id">Zone<span class="required">*</span></label>
                </b></td>
              <td colspan="3"><select style='width:32em;' id="zone_id"  name="zone_id">
                  <option value="1">test zone1</option>
                  <option value="2">Test zone2</option>
                </select>
                <?php echo form_error('zone_id'); ?></td>
            </tr>
            <tr>
              <td colspan="1" ><b>
                <label for="address_1">Address 1<span class="required">*</span></label>
                </b></td>
              <td colspan="3" ><input id="address_1" type="text" name="address_1" value="<?php echo $list_company['address_1']; ?>"  style='width:29em;'/>
                <?php echo form_error('address_1'); ?></td>
              <td ><b>
                <label for="address_2">Address_2</label>
                </b></td>
              <td colspan="3" ><input id="address_2" type="text" name="address_2" value="<?php echo $list_company['address_2']; ?>"   style='width:29em;' />
                <?php echo form_error('address_2'); ?></td>
            </tr>
            <tr>
              <td ><b>
                <label for="zone_name">Zone Name</label>
                </b></td>
              <td ><input id="zone_name" type="text" name="zone_name" value="<?php echo $list_company['zone_name']; ?>" style='width:10em;'  />
                <?php echo form_error('zone_name'); ?></td>
              <td><b>
                <label for="city">City<span class="required">*</span></label>
                </b></td>
              <td><input id="city" type="text" name="city" value="<?php echo $list_company['city']; ?>" style='width:10em;' />
                <?php echo form_error('city'); ?></td>
              <td><b>
                <label for="zip_code">Zipcode<span class="required">*</span></label>
                </b></td>
              <td><input id="zip_code" type="text" name="zip_code" value="<?php echo $list_company['zip_code']; ?>"  style='width:10em;'  />
                <?php echo form_error('zip_code'); ?></td>
              <td><b>
                <label for="phone">Phone</label>
                </b></td>
              <td><input id="phone" type="text" name="phone" value="<?php echo $list_company['phone']; ?>" style='width:10em;'  />
                <?php echo form_error('phone');  ?></td>
            </tr>
            <tr>
              <td><label for="address_format">Address Format<span class="required">*</span></label></td>
              <td colspan="7"><textarea id="address_format" name="address_format" value="<?php echo $list_company['address_format']; ?>" style="height:150px; width:95%;"></textarea>
                <?php echo form_error('address_format'); ?></td>
            </tr>
          </tbody>
        </table>
      </div>
      <table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-right: 30px; margin-bottom: 10px;text-align:right">
        <tbody>
          <tr>
            <td><input type="submit" value="Save Changes" name="search" class="btn btn-primary"></td>
          </tr>
        </tbody>
      </table>
      <?php echo form_close(); ?> </div>
  </div>
</div>
<!--/content--> 
<?php echo $footer ?> 
<script>
$(document).ready( function () {
    $(".collapse").collapse()({
      show: false
      });
});
</script>